package school;

import java.util.List;
import courseagenda.Course;

import javax.swing.JFrame;
import javax.swing.JOptionPane;

public abstract class School {

	protected String myUsername;
	protected String myPassword;
	protected String myURL;
	protected List<Course> myCourses;
	
	public School(){}
	
	public School(String url){
		myURL = url;
	}
	
	protected void getInfo(){
		JFrame frame = new JFrame();
		myUsername = (String)JOptionPane.showInputDialog(frame,
				"Enter your username", "User Info", JOptionPane.PLAIN_MESSAGE);
		myPassword = (String)JOptionPane.showInputDialog(frame,
				"Enter your password", "User Info", JOptionPane.PLAIN_MESSAGE);
	}
	
	protected abstract boolean sendInfo();
	
	protected abstract void displayHomePage();
	
	/**
	 * This is the main function that runs the process
	 * of logging in, getting credentials, and loading
	 * up the home page.
	 */
	public void login() {
		getInfo();
		sendInfo();
		displayHomePage();
	}
	
	
	
}
